#include "Unit.h"
#include "string.h"

using namespace std;

Unit::Unit(const Uint32 ratio_i, string& unitName_i):ratio_m(1),unitName_m(unitName_i)
{
}

Unit::Unit(const Uint32 ratio_i, const Unit &unit_i, string& unitName_i)
{
        ratio_m = ratio_i * unit_i.toBase();
        strcpy(unitName_m, unitName_i.c_str());
}

Uint32 Unit::toBase() const
{
        return ratio_m;
}

String Unit::getUnitName() const
{
        return unitName_m;
}


